#ifndef IMAGE_CONTAINER_H
#define IMAGE_CONTAINER_H

#include <QtGui>
#include "image.h"
#include "../src/histogram.h"

class ImageContainer : public QWidget{
	Q_OBJECT

	public:
		ImageContainer(QWidget *_parent = NULL);
		~ImageContainer();

        bool loadImage(const QString &);
        bool save();
        bool saveAs();
//        void cut();
//        void copy();
//        void paste();

        void normalSize();
        void zoomIn();
        void zoomOut();
        void fitToWindow();

        QImage *getImage();
        QString getName();
        Histogram *getHistogram();

    public slots:
        void update(QImage *_img = NULL);

    private:
        void closeEvent(QCloseEvent *event);
        bool maybeSave();
        void setCurrentImage(const QString &);

        bool isUntitled;
        QString pathName;

        Image *image;
        Histogram *histogram;
};

#endif
